<html>
<head><meta charset="utf-8"><title>-Zclosure and 2021 · t-compiler/wg-rfc-2229 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/index.html">t-compiler/wg-rfc-2229</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html">-Zclosure and 2021</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="244972868"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244972868" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244972868">(Jul 05 2021 at 20:45)</a>:</h4>
<p><span class="user-mention" data-user-id="281950">@Aman Arora</span> I'm debating about <a href="https://github.com/rust-lang/rust/pull/86818/">https://github.com/rust-lang/rust/pull/86818/</a> -- the logic seems quite a bit more complicated -- it occurs to me that we don't necessarily <em>need</em> to support this option on Rust 2021.</p>



<a name="244972902"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244972902" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244972902">(Jul 05 2021 at 20:46)</a>:</h4>
<p>I expect we will remove that option once rust 2021 ships</p>



<a name="244972943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244972943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244972943">(Jul 05 2021 at 20:46)</a>:</h4>
<p>So this came up as an idea for letting user profile closures for perf optimization</p>



<a name="244972957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244972957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244972957">(Jul 05 2021 at 20:46)</a>:</h4>
<p>But i fyou feel like this isn't a long lasting flag then there is no need to merge this</p>



<a name="244972972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244972972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244972972">(Jul 05 2021 at 20:47)</a>:</h4>
<p>The idea sparked from: <a href="https://github.com/rust-lang/edition-guide/pull/246#discussion_r663139817">https://github.com/rust-lang/edition-guide/pull/246#discussion_r663139817</a></p>



<a name="244974220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244974220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244974220">(Jul 05 2021 at 21:04)</a>:</h4>
<p>well, I saw this primarily as a "transition" thing</p>



<a name="244974228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244974228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244974228">(Jul 05 2021 at 21:04)</a>:</h4>
<p>after the feature has been here a while, it's probably not that interesting to compare before/after</p>



<a name="244974235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244974235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244974235">(Jul 05 2021 at 21:04)</a>:</h4>
<p>it may still be interesting to be able to just profile the size of closures overall</p>



<a name="244974240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244974240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244974240">(Jul 05 2021 at 21:04)</a>:</h4>
<p>to help in identifying opportunities for optimization</p>



<a name="244974255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244974255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244974255">(Jul 05 2021 at 21:05)</a>:</h4>
<p>my hunch would be that the best way to do that, though, would be to dump a json file that includes information about what is captured too</p>



<a name="244974266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244974266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244974266">(Jul 05 2021 at 21:05)</a>:</h4>
<p>so someone can load it up and do analysis ("what would be the effect of different optimizations")</p>



<a name="244975182"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure%20and%202021/near/244975182" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aman Arora <a href="https://rust-lang.github.io/zulip_archive/stream/189812-t-compiler/wg-rfc-2229/topic/-Zclosure.20and.202021.html#244975182">(Jul 05 2021 at 21:21)</a>:</h4>
<p>Okay that makes sense</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>